{include file="common/doc"/}
<body>
<div class="layui-fluid">
    <table lay-filter="table_list" id="table_list"></table>
</div>
<script src="/layuiadmin/layui/layui.js"></script>
</body>
<script>
    layui.config({
        base: '/layuiadmin/' //静态资源所在路径
    }).extend({
        index: 'lib/index', //主入口模块
    }).use(['index' ,'table','tinymce'] ,function () {
        var $ = layui.$
            ,form = layui.form
            ,layedit = layui.layedit
            ,tinymce = layui.tinymce
            ,table = layui.table;

        table.render({
            elem: '#table_list'
            ,height: 'full-20'
            ,limit:30
            ,url: 'read' //数据接口
            ,skin:'line'
            ,page: true //开启分页
            ,cols: [[ //表头
                {field: 'order_id', title: '订单号', width:80}
                ,{field: 'task_name', title: '任务类型', width:80, sort: true}
                ,{field: 'begin_time', title: '任务开始时间', width:80}
                ,{field: 'order_price', title: '价格', width: 177}
                ,{field:'keyword',title: '搜索关键字'}
                ,{field:'count',title: '发布量/剩余',templet:function(d){
                    return d.count+'/'+d.complete_count;
                    }}
                ,{field:'show',title: '展现/剩余',templet:function(d){
                        return d.show+'/'+d.complete_show;
                    }}
                ,{field:'order_status',title: '任务状态',templet:function(d){
                       let s = {
						'-9':'订单未提交，未扣款（提示各种异常)',
						'1':'成功', 
						'0':'处理中',
						'8':'取消任务中', 
						'9':'部分退款',
						'10':'全额退款' 
                       };
                       return s[d.order_status];
                    }}
                ,{field:'send_day',title: '发布天数'}
                ,{field:'remark',title: '备注'}
            ]]
        });

    });


</script>
</html>
